import gamestate
import pygame

class LevelAdvance(gamestate.GameState):
    """GameState for advancing from one level to another"""
    
    def __init__(self):
        #basic keybinds
        self.keybinds = {'to_game': pygame.K_ESCAPE}
        
        #link actions to appropriate function references
        self._actions = {'to_game': self._action_to_game}
        
        self._newState = self
            
    def enter_state(self):
        self._newState = self
    
    def update(self, etime):
        return self._newState
    
    def _action_to_game(self):
        self._newState = gamestate.GameState.validStates['ingame']